$.ajaxPrefilter(function (option) {
    option.url = "http://122.51.249.55:8360" + option.url;
    if (option.url.indexOf("/api") !== -1) {
        option.headers = {
            Authorization: localStorage.getItem('token') || ''
        }
    }
    option.complete = function (res) {
        if (
            res.responseJSON.message === "身份认证失败" &&
            res.responseJSON.code == 1
        ) {
            localStorage.removeItem("token");
            localStorage.href = "/login.html";
        }
    };
});